#!/bin/bash
#==================================================================================================
#
#  Run script for the traits module of the Blaze test suite
#
#  Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
#
#  This file is part of the Blaze library. You can redistribute it and/or modify it under
#  the terms of the New (Revised) BSD License. Redistribution and use in source and binary
#  forms, with or without modification, are permitted provided that the following conditions
#  are met:
#
#  1. Redistributions of source code must retain the above copyright notice, this list of
#     conditions and the following disclaimer.
#  2. Redistributions in binary form must reproduce the above copyright notice, this list
#     of conditions and the following disclaimer in the documentation and/or other materials
#     provided with the distribution.
#  3. Neither the names of the Blaze development group nor the names of its contributors
#     may be used to endorse or promote products derived from this software without specific
#     prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
#  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
#  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
#  SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
#  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
#  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
#  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
#  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
#  DAMAGE.
#
#==================================================================================================


PATH_TRAITS=$( dirname "${BASH_SOURCE[0]}" )


#==================================================================================================
# AddTrait tests
#==================================================================================================

$PATH_TRAITS/addtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SubTrait tests
#==================================================================================================

$PATH_TRAITS/subtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# MultTrait tests
#==================================================================================================

$PATH_TRAITS/multtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SchurTrait tests
#==================================================================================================

$PATH_TRAITS/schurtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# CrossTrait tests
#==================================================================================================

$PATH_TRAITS/crosstrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# KronTrait tests
#==================================================================================================

$PATH_TRAITS/krontrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DivTrait tests
#==================================================================================================

$PATH_TRAITS/divtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# MapTrait tests
#==================================================================================================

$PATH_TRAITS/maptrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# ExpandTrait tests
#==================================================================================================

$PATH_TRAITS/expandtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# ReduceTrait tests
#==================================================================================================

$PATH_TRAITS/reducetrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# Repeat tests
#==================================================================================================

$PATH_TRAITS/repeattrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SolveTrait tests
#==================================================================================================

$PATH_TRAITS/solvetrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SubvectorTrait tests
#==================================================================================================

$PATH_TRAITS/subvectortrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# ElementsTrait tests
#==================================================================================================

$PATH_TRAITS/elementstrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# SubmatrixTrait tests
#==================================================================================================

$PATH_TRAITS/submatrixtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# RowTrait tests
#==================================================================================================

$PATH_TRAITS/rowtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# RowsTrait tests
#==================================================================================================

$PATH_TRAITS/rowstrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# ColumnTrait tests
#==================================================================================================

$PATH_TRAITS/columntrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# ColumnsTrait tests
#==================================================================================================

$PATH_TRAITS/columnstrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# BandTrait tests
#==================================================================================================

$PATH_TRAITS/bandtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclSymTrait tests
#==================================================================================================

$PATH_TRAITS/declsymtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclHermTrait tests
#==================================================================================================

$PATH_TRAITS/declhermtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclLowTrait tests
#==================================================================================================

$PATH_TRAITS/decllowtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclUniLowTrait tests
#==================================================================================================

$PATH_TRAITS/declunilowtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclStrLowTrait tests
#==================================================================================================

$PATH_TRAITS/declstrlowtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclUppTrait tests
#==================================================================================================

$PATH_TRAITS/declupptrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclUniUppTrait tests
#==================================================================================================

$PATH_TRAITS/decluniupptrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclStrUppTrait tests
#==================================================================================================

$PATH_TRAITS/declstrupptrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclDiagTrait tests
#==================================================================================================

$PATH_TRAITS/decldiagtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclIdTrait tests
#==================================================================================================

$PATH_TRAITS/declidtrait/run; if [ $? != 0 ]; then exit 1; fi


#==================================================================================================
# DeclZeroTrait tests
#==================================================================================================

$PATH_TRAITS/declzerotrait/run; if [ $? != 0 ]; then exit 1; fi
